package cn.antsing.entity;

import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;

public class Cat implements InitializingBean,DisposableBean {
    private Integer age;
    private String name;

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
   public Cat(){
        System.out.println("----------------Cat --构造函数-----------------");
    }
    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("---------------Cat--afterPropertiesSet--------------------");
    }

    @Override
    public void destroy() throws Exception {
        System.out.println("---------------Cat--destroy--------------------");
    }

   /* @Override
    public String toString() {
        return "User{" +
                "age=" + age +
                ", name='" + name + '\'' +
                '}';
    }*/
}
